from django.conf.urls import url

from . import views

app_name ='[users]'
urlpatterns = [
    # 用户注册： reverse(users:register) == '/register/'
    url(r'^register/$', views.RegisterView.as_view(), name='register'),
    # UsernameCountView 用户名验重功能
    url(r'^username/(?P<username>[a-zA-Z0-9-_]{5,20})/count/$', views.UsernameCountView.as_view()),
    # MobilCountView 手机验重功能
    url(r'^mobile/(?P<mobile>1[3-9]\d{9})/count/$', views.MobilCountView.as_view()),
    # 用户登陆
    url(r'^login/$', views.LoginView.as_view(), name='login'),
     # 用户退出登陆
    url(r'^logout$', views.LogoutView.as_view(), name='logout'),
    # 用户中心路由
    url(r'^info$', views.UserInfoView.as_view(), name='info'),

]